using System;
using System.Collections.Generic;
using System.Text;

namespace ElteIk.RoboSoccer.Core.Physics
{
	/// <summary>
	/// A common class representing a set of objects to be put into the physical simulation.
	/// </summary>
    public class World
    {
		public World()
		{
			objects = new List<IPhysicalObject>(32);	
		}

		private List<IPhysicalObject> objects;
		public List<IPhysicalObject> Objects
		{
			get { return objects; }
		}

		public void Add(IPhysicalObject physicalObject)
		{
			objects.Add(physicalObject);
		}

		public void Add(IEnumerable<IPhysicalObject> phyisicalObjectsContainer)
		{
			if (phyisicalObjectsContainer == null)
				return;

			foreach (IPhysicalObject phyisicalObject in phyisicalObjectsContainer)
				Add(phyisicalObject);
		}
    }
}
